package com.zlm.design.combined.clac;

import java.util.Map;

/**
 * @author zlm
 * @date 2025/4/21
 */
public class VirtualExpression implements Expression{


    private Map<String, Integer> variables;
    private String var;

    public VirtualExpression(String var,Map<String, Integer> variables) {
        this.var = var;
        this.variables = variables;
    }

    @Override
    public int getValue() {
        return variables.get(var);
    }
}
